package com.weishi.project.training.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.weishi.project.api.vo.*;
import com.weishi.project.training.domain.LeaveForm;
import com.weishi.project.training.domain.NaturalYear;
import com.weishi.project.training.domain.Sportsman;
import com.weishi.project.training.domain.TrainingWeek;
import com.weishi.project.training.mapper.LeaveFormMapper;
import com.weishi.project.training.service.ILeaveFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * leaveFormService业务层处理
 */
@Service
public class LeaveFormServiceImpl extends ServiceImpl<LeaveFormMapper, LeaveForm> implements ILeaveFormService {

    @Autowired
    private LeaveFormMapper leaveFormMapper;

    /**
     * 查询leaveForm列表
     */
    @Override
    public List<LeaveForm> selectLeaveFormList(LeaveForm leaveForm) {
        return leaveFormMapper.selectLeaveFormList(leaveForm);
    }

    @Override
    public List<Sportsman> querySportsNameList() {
        return leaveFormMapper.querySportsNameList();
    }

    @Override
    public LeaveForm getLeaveFormById(int id) {
        return leaveFormMapper.getLeaveFormById(id);
    }

    @Override
    public void updateLeaveFormById(LeaveForm leaveForm) {
        leaveFormMapper.updateLeaveFormById(leaveForm);
    }

    @Override
    public boolean countLeaveFormById(int id) {
        return leaveFormMapper.countLeaveFormById(id)>0;
    }

    @Override
    public List<PeopleCountVo> getPeopleCount(Map<String, Object> map) {
        return leaveFormMapper.getPeopleCount(map);
    }

    @Override
    public List<PeopleEveryMonth> queryCount(Map<String, Object> map) {
        return leaveFormMapper.queryCount(map);
    }

    @Override
    public LeaveForm queryBySportsmanId(int id) {
        return leaveFormMapper.queryBySportsmanId(id);
    }

    @Override
    public List<LeaveForm> queryBySportsmanIdAll(Map<String, Object> map) {
        return leaveFormMapper.queryBySportsmanIdAll(map);
    }

    @Override
    public List<LeaveForm> queryBySportsmanllness(Map<String, Object> map) {
        return leaveFormMapper.queryBySportsmanllness(map);
    }

    @Override
    public List<LeaveForm> queryBySportsmanAllergy(Map<String, Object> map) {
        return leaveFormMapper.queryBySportsmanAllergy(map);
    }

    @Override
    public int updateBySportsmanId(LeaveForm leaveForm) {
        return leaveFormMapper.updateBySportsmanId(leaveForm);
    }

    @Override
    public int getCountByDay(Map<String, Object> map) {
        return leaveFormMapper.getCountByDay(map);
    }

    @Override
    public TrainingWeek getWeekIdByNowDate() {
        return leaveFormMapper.getWeekIdByNowDate();
    }

    @Override
    public int getCountByTime(Map<String, Object> map) {
        return leaveFormMapper.getCountByTime(map);
    }

    @Override
    public NaturalYear getCountByYear() {
        return leaveFormMapper.getCountByYear();
    }

    @Override
    public List<LeaveFormTypeVo> getLeaveFormTypeVoCount(Map<String, Object> params) {
        return leaveFormMapper.getLeaveFormTypeVoCount(params);
    }

    @Override
    public List<SportsInjuryVo> getSportsInjuryVoList(Map<String, Object> params) {
        return leaveFormMapper.getSportsInjuryVoList(params);
    }

    @Override
    public List<InjuryCountVo> getInjuryCountVoList(Map<String, Object> params) {
        return leaveFormMapper.getInjuryCountVoList(params);
    }

    @Override
    public List<InjuryCountVo> getInjuryCountVoListOne(Map<String, Object> params) {
        return leaveFormMapper.getInjuryCountVoListOne(params);
    }

    @Override
    public List<InjuryCountVo> getInjuryCountVoListTwo(Map<String, Object> params) {
        return leaveFormMapper.getInjuryCountVoListTwo(params);
    }

    @Override
    public List<InjuryCountVo> getInjuryCountVoListThree(Map<String, Object> params) {
        return leaveFormMapper.getInjuryCountVoListThree(params);
    }

    @Override
    public List<InjuryCountVo> getInjuryCountVoListFour(Map<String, Object> params) {
        return leaveFormMapper.getInjuryCountVoListFour(params);
    }

    @Override
    public List<LeaveFormInjuryVo> getLeaveFormInjuryVo(Map<String, Object> params) {
        return leaveFormMapper.getLeaveFormInjuryVo(params);
    }

    @Override
    public List<LeaveForm> getLeaveFormDetails(Map<String, Object> params) {
        return leaveFormMapper.getLeaveFormDetails(params);
    }

    @Override
    public List<LeaveForm> getLeaveFormByNowDate(Map<String, Object> params) {
        return leaveFormMapper.getLeaveFormByNowDate(params);
    }

    @Override
    public List<LeaveForm> getLeaveFormByWeek(TrainingWeek trainingWeek) {
        return leaveFormMapper.getLeaveFormByWeek(trainingWeek);
    }
}